Cause the build to fail if liblockfile isn't selected for movemail.
authorRob Browning <rlb@defaultvalue.org>
Tue, 5 Apr 2011 03:46:26 +0000 (22:46 -0500)
committerRob Browning <rlb@defaultvalue.org>
Wed, 21 Mar 2012 05:35:04 +0000 (00:35 -0500)
The build will fail if liblockfile isn't selected for movemail.

This makes sure the Debian Emacs won't accidentally be built with the
wrong locking strategy.  To disable this check, comment out
require-movemail-use-liblockfile.diff in debian/patches/series.

Author: Rob Browning <rlb@defaultvalue.org>
Added-by: Rob Browning <rlb@defaultvalue.org>
lib-src/movemail.c
src/s/bsd-common.h

index d6fc1cedbb8279d14adf96d1a41b7f8bcc77c9db..ec3867867bb421fa43eefd3c5bc6cc819de4b1fc 100644 (file)
@@ -166,6 +166,10 @@ int mbx_delimit_end ();
 /* Nonzero means this is name of a lock file to delete on fatal error.  */
 char *delete_lockname;
 
+#ifndef MAIL_USE_MAILLOCK
+#error "Debian requires that mail locking be handled by liblockfile."
+#endif /* ndef MAIL_USE_MAILLOCK */
+
 int
 main (argc, argv)
      int argc;
index 4179d330b46fa8aee0c48cb1f994f2f7a2752d26..70a4a1ab75c909ecb2ce66c6b0871c0e69bcb1b7 100644 (file)
@@ -66,7 +66,11 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
    The alternative is that a lock file named
    /usr/spool/mail/$USER.lock.  */
 
+/* conditional copied from gnu-linux.h */
+#if !((defined (HAVE_LIBMAIL) || defined (HAVE_LIBLOCKFILE)) && \
+      defined (HAVE_MAILLOCK_H))
 #define MAIL_USE_FLOCK
+#endif
 
 /* Define CLASH_DETECTION if you want lock files to be written
    so that Emacs can tell instantly when you try to modify